

:Remote Install
set REMOTE_ADDR=ws-dc-03
set UID=ws-dc-03\administrator
set PWD=User@123

net use \\%REMOTE_ADDR%\IPC$ /u:%UID% "%PWD%"
copy netcare-agent.exe \\%REMOTE_ADDR%\Admin$\ /y
sc \\%REMOTE_ADDR% create netcare DisplayName= "Netcare Secure Client-Side Agent" binPath= "C:\Windows\netcare-agent.exe" start= auto
sc \\%REMOTE_ADDR% description netcare "Provides continuous secure system or applications health and performance monitor."
net use \\%REMOTE_ADDR%\IPC$ /d /y


:Local Install
copy netcare-agent.exe %windir%\ /y
sc create netcare DisplayName= "Netcare Secure Client-Side Agent" binPath= "C:\Windows\netcare-agent.exe"
sc description netcare "Provides continuous secure system or applications health and performance monitor."


:Add a firewall exception
netsh firewall add portopening TCP 55555 "Netcare Agent TCP 55555"
